<?php  defined('BASEPATH') or exit('No direct script access allowed');

abstract class Module {
	public $version;
    public $name;
    
	public abstract function info();
    public abstract function routes();
    public function __construct()
    {
        
    }
	public function __get($var)
	{
		static $ci;
		isset($ci) OR $ci =& get_instance();
		return $ci->{$var};
	}
    
    public function get_route_by_slug($slug)
    {
        foreach($this->routes() as $route)
        {
            if($route['slug'] == $slug)
            {
                return $route;
            }
        }
        
    }
	
}